/*******************************************************************
 *
 * Copyright (C), 2021-2022, LS, All rights reserved.
 *
 * Author      : 
 * Create Time : 2021-09-17
 * Version     : v0.1
 * Description : 
 *******************************************************************/
#ifndef _LS_BLE_CUSTOM_PROTOCOL_H_
#define _LS_BLE_CUSTOM_PROTOCOL_H_
 
/*----------------------------Head file----------------------------*/
#include "stdint.h"
#include "stdbool.h"

/*----------------------------macro file---------------------------*/

#define CUSTOM_PACKET_HEAD_SIZE             7
#define CUSTOM_FIRST_FRAME_DATA_MAX_SIZE    13
#define CUSTOM_REST_FRAME_DATA_MAX_SIZE     19

/*----------------------------type define--------------------------*/

/*----------------------------var define---------------------------*/

/*-------------------------func declaration------------------------*/
extern bool custom_send_queue_is_empty(void);

extern void app_skip_mem_resend_timeout_handle(void);
extern void app_skip_mem_resend_timer_start(void);
extern bool custom_upload_msg(uint8_t cmd, uint8_t *payload, uint16_t payload_len);
extern bool custom_upload_unsent_skip_data(void);

extern void custom_protocol_init(void);
extern void custom_protocol_send_queue_clear(void);
extern void custom_protocol_disconnect_handle(void);

/*-----------------------------------------------------------------*/

#endif
